#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
class book
{
private:
	int qu;
	int price;
public:
	book(int q = 0, int p = 0) :qu(q), price(p) {}
	void  calculate()
	{
		cout << qu * price << endl;
	}
};
int main()
{
	int i;
	book arr[5] =
	{
	  book(1,10),book(2,20),book(3,30),book(4,40),book(5,50)
	};
	book* p = arr;
	for (i = 0; i < 5; i++)
	{
		(p + i)->calculate();

	}
	return 0;
}
